#!/usr/bin/env python
# encoding: utf-8

def build(bld):
    bld.ap_stlib(
        name='AP_DAL' + '_libs',
        ap_vehicle='AP_DAL_Standalone',
        ap_libraries=[
            'AP_NavEKF2',
            'AP_NavEKF3',
            'AP_NavEKF',
            'AP_Common',
            'AP_Math',
            'AP_DAL',
            'AP_InternalError',
            'AP_Declination',
            'AP_RTC',
        ],
    )

    # only valid to build with no GCS and no scripting
    if '-DHAL_NO_GCS=1' in bld.env.CXXFLAGS and 'ENABLE_SCRIPTING=1' not in bld.env.DEFINES:
        bld.ap_program(
            program_groups=['tools'],
            use='AP_DAL_libs',
        )
